1. Field of the Invention
The present invention relates to an information processing apparatus and a recording medium for processing an archive file in an archive file format in which one or more files converted into block data items are merged into a single file.
2. Description of the Related Art
Generally, a file used on a computer is stored in pieces in a recording medium such as a hard disk. The file stored in the recording medium is accessed through a file system function, which is supported by basic software, i.e., an operating system of the computer. A file system is a method for organizing files and their locations in recording media. For example, FAT16 (File Allocation Table), FAT32, and NTFS are well known as file systems for operating systems such as Windows (™). The recording medium includes a cluster area for storing data of the file in pieces, and a file system area (file allocation table, etc.) for indicating the location of the file stored in the cluster area. The file system function of the operating system refers to the file system area, accesses the data of the file stored in pieces in the cluster area, and thus reads the file.
On the other hand, application programs access the file by using the data of the file read from the recording medium by the file system function of the operating system. As the application programs perform file input/output operations through the file system function, the application programs can access the data of the file stored in pieces as a single file regardless of the cluster area of the recording medium.
File access systems used by the application programs are classified into a sequential file system and a random file system. In the sequential file system, data items of a file are sequentially stored from the top of the file without record number information or the like. Therefore, in data update/access operations, the data items are sequentially accessed from the top of the file. In contrast, in the random file system, because record numbers of records storing data of a file are managed, direct access to a desired record of the file is allowed.
An archive file format (ZIP, LHA, etc.) is one of the file formats used by the application programs. The archive file format holds plural files as a single file by compressing the files. Because the archive file format is configured such that plural files are compressed and merged into a single archive file having a reduced data size, the archive file format is useful for transmitting plural files (e.g. downloading files from a server) and therefore widely used. When the archive file is to be used, all the compressed data items are decompressed sequentially from the top of the archive file before the use.
In recent years and continuing, with improvements of computer processing capacity, the use of multimedia information, in which information such as sound, still images, moving images, and 3D images are integrated, is increasing. As the format used for sound, still images, moving images, and 3D images varies, multimedia information often includes plural files. The archive file format is convenient for transmitting such multimedia information including plural files.
The applicant of the present invention has proposed, in Patent Document 1, a data structure of a document (encapsulated document) in which plural content files, a document structure file for defining the structure of the content files, and an operations program corresponding to the document structure file are encapsulated as a single file. According to Patent Document 1, as an operations program for reading an electronic document is encapsulated (archived) into electronic document information, and the electronic document can be read in a computer environment different from the computer environment of the creator of the document. Additional information added by a user is configured to be displayed along with the electronic document information, thereby efficiently managing the additional information.
[Patent Document 1] Japanese Patent Laid-Open Publication No. 2003-099424
For reading a desired data item contained in the archive file, conventionally, all the data items contained in the archive file are decompressed. This results in a long processing time. To avoid such a disadvantage, the archive file format enables, only in read operations, direct access to a desired data item by using an attribute data item stored in the archive file in the same way as a random file format.
However, in an archive file format such as ZIP, it is not allowed to update only a desired block data item contained in the archive file. The reason that updating of only a desired block data item contained in the archive file is not allowed is as follows.
When information of a file compressed into a block data item contained in an archive file is modified, the sizes of the block data item after encoding often differ even if the file sizes before the encoding are the same (in a common compression system, because a code pattern is replaced by another code pattern, the code sizes after encoding differ even if the code sizes before the encoding are the same). Therefore, storage locations of data items located below the updated block data item are changed according to the change in the size of the updated block data item. If the block data item in the archive file is directly updated by a conventional update method, the storage location of the attribute data item is changed. Thus, the archive file is destroyed, and the attribute data item cannot be read any more. That is, in an archive file format such as ZIP, when the archive file is directly updated, data in the archive file cannot be read any more.
There are cases where a user wants to update only a part of multimedia information in an archive file format such as ZIP while using the multimedia information. Inconveniently, such an update operation cannot be allowed in a conventional archive file format because of the reason described above, although operations for directly reading a desired block data item are allowed. The same applies to the encapsulated document file of Patent Document 1. That is, if the encapsulated document file has an archive file format such as ZIP, additional information cannot be saved into the encapsulated document file for updating the file.